  <%--                                                                       --%>
  <%-- Copyright (c) 2001-2005 BroadVision, Inc.  All rights reserved.       --%>
  <%--                                                                       --%>
  <%-- This software is copyrighted. Under the copyright laws, this software --%>
  <%-- may not be copied, in whole or in part, without prior written consent --%>
  <%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
  <%-- under the terms of a license between BroadVision and the recipient,   --%>
  <%-- and its use is subject to the terms of that license.                  --%>
  <%--                                                                       --%>
  <%-- This software may be protected by one or more U.S. and International  --%>
  <%-- patents.  Certain applications of BroadVision One-To-One software are --%>
  <%-- covered by U.S. patent 5,710,887.                                     --%>
  <%--                                                                       --%>
  <%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
  <%-- trademarks of BroadVision, Inc., in the United States and the         --%>
  <%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
  <%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
  <%-- Inc., in the United States and other countries. Additionally, IONA    --%>
  <%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
  <%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
  <%--                                                                       --%>

  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/bv-html.tld" prefix="bvhtml" %>
  <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>

  <script language="JavaScript">

  function closeWindow() {
    self.close();
  }

  function setContentOwner(theForm) {
    var radio = theForm.ownerId;
    // if there is no user in group, there is no radio button
    if (radio != null) {
      var len = radio.length;
      // if there is only one radio button
      if (len == null)
        radio = new Array(radio);
      var ownerIdName;
      for (var idx = 0; idx < radio.length; ++idx) {
	if (radio[idx].checked)
	  ownerIdName = radio[idx].value;
      }

      if (ownerIdName == null) {
	alert("<bean:message key="cs.error.owner"/>");
	return false;  
      }
      var idName = ownerIdName.split("##");
      var selectedOwnerId = idName[0];
      var selectedOwnerName = idName[1];
      window.opener.setOwner(selectedOwnerId, selectedOwnerName);
    }
    closeWindow();
  }

</script>


<!-- BEGIN form ( csContentSelectOwnerForm ) -------------------------->
<html:form action="/cs/contentSelectOwner.do">
  <bvhtml:hiddenList name="micrositeNaviInfoView" property="urlParams" scope="request"/>
<!-- Zone 5 starts here.  -->
      
<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" 
       summary="content area">
  <tr>
    <td valign="top">
	
	<!-- close window button here -->
	  <div class="generalWrapRight">
        <html:button property="closeBtn" titleKey="button.close.window" styleClass="inputButton" onclick="javascript:closeWindow()">
          <bean:message key="button.close.window" />
        </html:button>
      </div>
	<!-- end button -->
	
    <!--start page title here-->
      <div class="pageTitle">
        <span class="left">
          <bean:message key="cs.content.select.owner"/>
        </span>
        <span class="right">
          &nbsp;</span>

      </div> 
    <!--end page title here-->
    
    <!--start sub title bar here-->
    <div class="pageSubtitle">
      <span class="left">
        <bean:message key="cs.select.owner"/>
      </span>
	  <span class="right">&nbsp;</span>
    </div>  
    
    <div class="blockWrap">
      
    <!-- start Page Instructions -->
    <div class="pageInstructions">
      <bean:message key="cs.content.select.owner.note"/>
    </div>
    <!-- End Page Instructions -->
      
    <!--start main content area here-->
    <table class="dataTable" width="100%" border="0" cellspacing="1" 
           cellpadding="2" summary='<bean:message key="cs.content.select.owner"/>'>
    <logic:empty name="csContentSelectOwnerView" property="availableOwnerCandidates">
      <tr class="listOdd">
	<td align="center" colspan=3><bean:message key="cs.no.group.members"/>
	</td>
      </tr>
    </logic:empty>
    <logic:notEmpty name="csContentSelectOwnerView" property="availableOwnerCandidates">
      <tr class="listHeader"> 
	<th id="select" align="center"><bean:message key="cs.select"/></th>
	<th id="name" align="left"><bean:message key="cs.name"/></th>
      </tr>

      <bean:define id="curOwnerId" name="csContentSelectOwnerForm" property="ownerId" />
      <logic:iterate id="oneUser" name="csContentSelectOwnerView" property="availableOwnerCandidates" indexId="index" type="org.apache.struts.util.LabelValueBean">
        <%
          String checkedStr = (curOwnerId.toString().equals((String)oneUser.getValue())) ? "CHECKED" : "";
        %>
	<tr class='<%= index.intValue() % 2 == 0 ? "listEven" : "listOdd"%>'>
	  <td headers="select" align="center">
            <input type="radio" <%=checkedStr%> name="ownerId" value='<bean:write name="oneUser" property="value"/>##<bean:write name="oneUser" property="label"/>' >
	  </td>
	  <td headers="name" align="left"><bean:write name="oneUser" property="label" /></td>
	</tr>
      </logic:iterate>
    </logic:notEmpty> 

  </table> 
  <div class="pageButtonWrap" align="right">  
    <html:button property="setOwner" titleKey="cs.button.set.owner" onclick="setContentOwner(this.form)" styleClass="pageButton">
      <bean:message key="cs.button.set.owner"/>
    </html:button>
  </div>  

</html:form>
  
<!-- END form ( csContentSelectOwnerForm ) ---------------------------->
